<?php

use think\migration\Seeder;

use think\facade\Db;
class Express extends Seeder
{
    /**
     * Run Method.
     *
     * Write your database seeder using this method.
     *
     * More information on writing seeders is available here:
     * http://docs.phinx.org/en/latest/seeding.html
     */
    public function run(): void
    {

        if(Db::name('express')->count()>0){
            return;
        }
        $data = [
            [
                'name' => '顺丰快运',
                'code' => 'SFEXPRESS',
                'status' => 1,
                'create_time' => time(),
            ],
            [
                'name' => '圆通速递',
                'code' => 'YTO',
                'status' => 1,
                'create_time' => time(),
            ],
            [
                'name' => '韵达快递',
                'code' => 'YUNDA',
                'status' => 1,
                'create_time' => time(),
            ],
            [
                'name' => '申通快递',
                'code' => 'STO',
                'status' => 1,
                'create_time' => time(),
            ],
            [
                'name' => '中通快递',
                'code' => 'ZTO',
                'status' => 1,
                'create_time' => time(),
            ],
            [
                'name' => '极兔速递',
                'code' => 'JITU',
                'status' => 1,
                'create_time' => time(),
            ],
            [
                'name' => '邮政快递包裹',
                'code' => 'CHINAPOST',
                'status' => 1,
                'create_time' => time(),
            ],
            [
                'name' => 'EMS',
                'code' => 'EMS',
                'status' => 1,
                'create_time' => time(),
            ],
            [
                'name' => '京东物流',
                'code' => 'JD',
                 'status' => 1,
                'create_time' => time(),
            ],
            [
                'name' => '百世快递',
                'code' => 'HTKY',
                'status' => 1,
                'create_time' => time(),
            ],
            [
                'name' => '韵达快运',
                'code' => 'YUNDA56',
                'status' => 1,
                'create_time' => time(),
            ],
            [
                'name' => '宅急送',
                'code' => 'ZJS',
                 'status' => 1,
                'create_time' => time(),
            ],
            [
                'name' => '天天快递',
                'code' => 'TTKDEX',
                'status' => 1,
                'create_time' => time(),
            ],

        ];

      Db::name('express')->insertAll($data);


    }
}